package com.kyw.androidquicktest;

import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

import android.widget.TextView;

import com.kyw.androidquicklib.view.MessageToastView;
import com.kyw.androidquicktest.process.MainProcess;
import com.kyw.androidquicktest.util.BaseActivity;
import com.kyw.androidquicktest.viewmodel.UserViewModoel;

public class MainActivity extends BaseActivity {
    public TextView view_name;
    public TextView view_job;
    public TextView view_first;
    public MessageToastView view_msgView;
    MainProcess process;
    @Override
    protected void initData() {
        process = new MainProcess(this);
        process.getUserInfo();

        process.updateUserInfo(view_name,view_job);

        process.testMessageView(view_msgView);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected ViewModel getViewModel() {
        return new ViewModelProvider(this).get(UserViewModoel.class);
    }

  public void findViews() { 
       view_name = findViewById(R.id.name);
       view_job = findViewById(R.id.job);
       view_first = findViewById(R.id.first);
       view_msgView = findViewById(R.id.msgView);


  }
}
